import request from '../utils/request';

export const fetchData = query => {
    return request({
        url: './table.json',
        method: 'get',
        params: query
    });
};
export const test = query => {
    return request({
        url: 'http://192.168.0.214:9021/fz/login/loginOut',
        method: 'post',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
            token: '9f5f2ddc-ca8a-4b03-96fa-758b30be4748',
        },
        // data:query,
        // params: query,
        // params: query,
    });
};
export const test2 = query => {
    // 创建formData对象；
    var formData = new FormData();
    formData.append("loginId", "admins");
    formData.append("password", 12345678);
    return request({
        url: 'http://localhost:9001/datong/login/sumit',
        method: 'post',
        // 声明发送formData数据的头部，默认是发送json
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        },
        data:query,
    });
};